<%@ page import="java.net.URLDecoder" %><%--
  Created by IntelliJ IDEA.
  User: HP
  Date: 2021/10/19
  Time: 17:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>主页</title>
</head>
<body>
<%
    Cookie[] cookies = request.getCookies();
    String[] s = null;

    if (cookies != null) {
        for (Cookie cookie : cookies) {
            if (URLDecoder.decode(cookie.getName(), "utf-8").equals("nameinfo")) {
                String str = URLDecoder.decode(cookie.getValue(), "utf-8");
                s = str.split("-");
            }
        }
    }
    assert s != null;%>
欢迎<%=s[0]%>
<hr/>
<a href="login.jsp">首页</a><br>
<a href="add.jsp">添加学生信息</a><br>
<a href="all.jsp">学生信息管理</a><br>
<a href="my.jsp">个人中心</a><br>

</body>
</html>
